-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request list and other adaptions for more efficient experience #110
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #110 +/- ##
===========================================
+ Coverage 49.51% 67.96% +18.45%
===========================================
Files 16 15 -1
Lines 2775 1767 -1008
===========================================
- Hits 1374 1201 -173
+ Misses 1401 566 -835
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
||
def __init__(self, data_list, add_meta_to_name=['src_name', 'product'], instrument=None, product=None): | ||
self._p_list = [] | ||
self._n_list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplication
|
||
os.makedirs(os.path.dirname(fn), exist_ok=True) | ||
|
||
json.dump(response_json, gzip.open(fn, "wt")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below, isn't it better to use context manager to open?
'ID': ID, 'prod_name': prod_name, 'meta_data:': meta_data | ||
'ID': ID, | ||
'prod_name': prod_name, | ||
'metadata': meta_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why both metadata
and meta_data
?
Switchable parameter warnings and DataCollection.as_list .as_dict are nice, other parts aren't clear for me |
it's not really done, I just thought it's good to start bringing it back, finish and then review. It's useful that you looked already. |
@@ -36,6 +36,9 @@ | |||
pass | |||
|
|||
import logging | |||
logging.warning('please import oda_api.tools.plot instead of oda_api.plot_tools') | |||
|
|||
from .tools.plot import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, will this module disappear in order to be replaced by the one in oda_api.tools?
?
def __init__(self, data_list, add_meta_to_name=['src_name', 'product'], instrument=None, product=None): | ||
self._p_list = [] | ||
self._n_list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why having two __init__
almost identical?
from exploitations